package com.wx.mall.operate.controller;

import com.wx.mall.common.api.CommonPage;
import com.wx.mall.common.api.CommonResult;
import com.wx.mall.operate.entity.RebSort;
import com.wx.mall.operate.service.impl.RebSortServiceImpl;
import com.wx.mall.operate.vo.RebSortReqNodeVo;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author j
 * @since 2020-06-01
 */
@RestController
@RequestMapping("/reb/sort")
public class RebSortController {

    @Autowired
    RebSortServiceImpl rebSortService;

    @ApiOperation(value = "类型查询")
    @GetMapping("/getSortList")
    public CommonResult<List<RebSortReqNodeVo>> getFindSortList(){
        List<RebSortReqNodeVo> rebSorts = rebSortService.findsSort();
        return CommonResult.success(rebSorts);
    }

}
